# 其他版本可参考https://www.postgresql.org/download/linux/ubuntu/
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt update
sudo apt install postgresql-16 postgresql-contrib postgresql-server-dev-16

# 观察状态
# sudo systemctl status postgresql.service
 
# 关闭
# sudo systemctl stop postgresql.service
 
#查看版本
psql --version

sudo apt install -y gcc g++ make git
 
# 然后找个地方clone
cd /tmp
git clone --branch v0.8.0 https://gitee.com/bidcms/pgvector.git
 
#进入克隆的路径，执行安装
cd pgvector
sudo make && sudo make install

 
# 启动
sudo systemctl start postgresql.service
#登陆，默认用户是postgres
sudo -u postgres psql

